Slide 1: Introduction to Ethereum
-
What is Ethereum?
- A decentralized, open-source blockchain platform that allows developers to build and deploy decentralized applications (dApps) using smart contracts.
- Created by Vitalik Buterin in 2015 to overcome the limitations of Bitcoin by providing a platform for programmable transactions.
Key Features:
- Smart Contracts: Self-executing contracts with the terms of the agreement directly written into code.
- Turing Complete: Ethereum’s programming languages (Solidity, Vyper) enable complex computations.
- Decentralization: Powered by a global network of nodes without a central authority.
Slide 2: What is ETH (Ether)?
Slide 3: Ethereum Network Architecture
-
Core Components:
- Nodes: Machines that run the Ethereum client software, validate transactions, and maintain the blockchain. Each node holds a copy of the entire Ethereum blockchain.
- Consensus Mechanism: Ethereum transitioned from Proof of Work (PoW) to Proof of Stake (PoS) through the Ethereum 2.0 upgrade, using validators instead of miners to secure the network.
- Shard Chains: Ethereum 2.0 introduces sharding, dividing the blockchain into multiple “shards” to improve scalability by processing transactions in parallel.
Network Types:
- Mainnet: Ethereum’s primary production network where real transactions and dApps operate.
- Testnets: Used for testing without risking real value. Popular testnets include Goerli, Sepolia, and Rinkeby.
Slide 4: Ethereum Ecosystem Overview
-
Decentralized Applications (dApps):
- Ethereum serves as the foundation for decentralized applications that operate without a central server.
- Categories of dApps:
- DeFi (Decentralized Finance): Financial services like lending, borrowing, and trading on platforms like Uniswap, Aave, and Compound.
- NFTs (Non-Fungible Tokens): Unique digital assets representing ownership of digital art, music, or in-game items. Examples: OpenSea, Rarible.
- Gaming and Virtual Worlds: Blockchain-based games and virtual worlds like Decentraland and Axie Infinity.
- DAOs (Decentralized Autonomous Organizations): Organizations governed by smart contracts where decision-making is decentralized. Example: MakerDAO.
Interoperability: Ethereum interacts with other blockchains and Layer 2 solutions, improving scalability, transaction speeds, and reducing fees.
Slide 5: Ethereum Keys and Addresses
Slide 6: Understanding Ethereum Transactions
-
Transaction:
- A cryptographically signed instruction to transfer value (Ether) or interact with a smart contract.
- Each transaction on Ethereum contains fields such as:
- Sender Address: The account initiating the transaction.
- Recipient Address: The account or contract receiving the transaction.
- Amount: The quantity of Ether being sent.
- Gas Limit: The maximum amount of gas the sender is willing to spend.
- Gas Price: The price per unit of gas (denominated in gwei).
Transaction Lifecycle:
- Broadcast: Sent by
msg.sender and broadcasted to the Ethereum network.
- Validation: Verified by validators/miners.
- Execution: The transaction is executed, and its result is added to the blockchain.
Example of a Transaction Structure:
{
"from": "0xSenderAddress",
"to": "0xRecipientAddress",
"value": "0xAmountInWei",
"gas": "0xGasLimit",
"gasPrice": "0xGasPrice",
"data": "0xOptionalData"
}

Slide 7: Messages in Ethereum

Slide 8: Understanding Ether
-
Ether (ETH):
- The native cryptocurrency of Ethereum, used for transactions, paying gas fees, and staking in Ethereum 2.0.
Denominations:
- Wei: The smallest unit of Ether. 1 ETH = 10^18 Wei.
- Gwei: Used commonly for gas pricing. 1 Gwei = 10^9 Wei.
Usage in Smart Contracts:
- Ether can be transferred between accounts or smart contracts, and is necessary for running computations.
Example:
function depositEther() public payable {
require(msg.value > 0, "Must send Ether");
// Logic to handle Ether
}
Slide 9: Gas and Gas Fees
-
Gas:
- The computational cost of executing operations on the Ethereum network.
- Gas Fee Calculation: Gas fees are calculated based on the gas limit and gas price set by the user. The total cost is
Gas Limit * Gas Price.
Key Concepts:
- Gas Limit: Maximum amount of gas a user is willing to spend for a transaction.
- Base Fee and Priority Fee: After EIP-1559, Ethereum introduced a base fee (burned) and priority fee (tips to validators) to improve transaction pricing efficiency.
Example of Gas Use:
- Sending Ether: 21,000 gas.
- Complex Smart Contract Interaction: Can consume hundreds of thousands of gas units depending on the computation.
Slide 10: Ethereum Virtual Machine (EVM)
-
EVM:
- The Ethereum Virtual Machine is the decentralized computation engine that executes smart contracts. Every Ethereum node runs the EVM, ensuring consensus across the network.
Features:
- Turing Complete: Capable of executing any computational logic, making Ethereum highly programmable.
- Bytecode Execution: Solidity code is compiled into EVM bytecode and then executed by nodes.
- Deterministic: The same input will always produce the same output across all nodes.
Security:
- The EVM operates in a sandboxed environment, isolated from the host system, ensuring safe execution of smart contracts.
Slide 11: EVM Overview
Title: Ethereum Virtual Machine: What is it?
- A Turing-complete virtual machine designed to execute smart contracts on Ethereum.
- Operates on the Ethereum blockchain at a lower level, interpreting and executing bytecode instructions.
- Each Ethereum node runs its own instance of the EVM to maintain consensus.
Slide 12: EVM Instruction Set (Opcodes)
Title: EVM Instruction Set (Opcodes)
- EVM executes bytecode—a compact set of instructions.
- Instructions are 256-bit (as EVM uses 256-bit words for stack operations).
- Examples of common opcodes:
- PUSH1, PUSH32: Pushes 1 to 32 bytes onto the stack.
- ADD, MUL, SUB: Basic arithmetic operations.
- SLOAD, SSTORE: Interactions with the Ethereum storage.
- CALL, DELEGATECALL: Used to invoke other contracts or functions.
Slide 13: Bytecode Compilation
Title: Compiling Smart Contracts into EVM Bytecode
- Solidity → EVM Bytecode
- Smart contracts written in Solidity (or Vyper) are compiled into EVM bytecode.
- Compiled contracts are distributed to every Ethereum node and stored on-chain.
- Example:
function add(uint x, uint y) public pure returns (uint) {
return x + y;
}
Compiles to:PUSH1 0x60
PUSH1 0x40
MSTORE
PUSH1 0x04
CALLDATASIZE
LT
PUSH1 0x10
JUMPI
- Metadata is also embedded in the bytecode (e.g., contract constructor, deployment info).
Slide 14: EVM Stack
Title: The EVM Stack Model
- EVM uses a stack-based architecture for computation.
- Word size: 256 bits (to match Ethereum’s cryptography primitives).
- Stack depth limit: 1024 items.
- All operations (e.g., arithmetic, logic) work with the topmost elements of the stack.
- Example:
- Opcode
ADD pops the two top values, adds them, and pushes the result.
Slide 15: Memory and Storage
Title: EVM Memory vs Storage
- Memory:
- Volatile, temporary storage during execution.
- Unbounded, but gas cost increases as more memory is used.
- Accessed with MLOAD and MSTORE opcodes.
- Storage:
- Persistent storage across transactions.
- State variables in contracts are stored here.
- Accessed with SLOAD (read) and SSTORE (write) opcodes.
- SSTORE is one of the most expensive operations in terms of gas.
- Mapping: Stored as a Keccak256 hash of key-value pairs.
Slide 16: EVM Gas Model
Title: Gas: The Fuel of the EVM
- Every EVM operation consumes gas to prevent abuse (e.g., infinite loops).
- Gas cost for common operations:
- ADD: 3 gas
- SLOAD: 2100 gas
- SSTORE: 20,000 gas (if changing from zero to non-zero)
- Transaction Gas Limit:
- Defines the maximum gas the sender is willing to pay.
- Refunds:
- Some operations (e.g., clearing storage slots) provide a gas refund.
Slide 17: EVM Execution Context
Title: Execution Context: Transactions and Contracts
- Transaction Execution:
- A transaction triggers the execution of contract code.
- Transaction data (input data, sender, value) is passed into the EVM as msg.data and processed by CALLDATA.
- Contract Execution:
- Contracts execute in isolation within their own execution context.
- CALL and DELEGATECALL are used to execute functions in other contracts.
Slide 18: EVM Transaction Lifecycle
Title: Transaction Lifecycle in EVM
- Transaction Creation: Sender signs and broadcasts the transaction.
- Transaction Validation: The network validates the signature and checks the sender’s balance for gas.
- Gas Allocation: The gas is allocated and the transaction begins execution.
- Bytecode Execution: The EVM executes the bytecode, consuming gas for each operation.
- Result Storage: If successful, storage or state changes are committed.
- Finalization: Any remaining gas is refunded to the sender.
Slide 19: EVM Execution Phases
Title: Phases of EVM Execution
- Frontier Phase:
- First phase where the EVM was introduced.
- Focus on executing smart contracts using proof-of-work.
- Metropolis Phase:
- Added optimizations like gas refunds, precompiled contracts.
- Enhancements for developer usability.
- Serenity (Ethereum 2.0):
- Proof-of-stake is introduced, but EVM remains the execution layer.
- Separation between consensus layer and execution layer (EVM).
Title: EVM Attack Vectors: Gas and Reentrancy
- Gas-Related Attacks:
- Malicious contracts could exhaust the gas limit to cause denial of service.
- Protection: Carefully managing gas and using mechanisms like gas stipend.
- Reentrancy Attacks:
- Contracts can call back into themselves before a previous call is completed, causing inconsistent states.
- Protection: Use checks-effects-interactions pattern and reentrancy guards.
Slide 21: Future of EVM
Title: The Future of the EVM
- EIP-1559: Gas fee model introduces a more predictable fee mechanism, improving efficiency.
- Ethereum 2.0: EVM remains in Ethereum 2.0, though it may be improved with better state management.
- EVM Evolution:
- Introduction of EVM-Compatible Chains like Binance Smart Chain, Avalanche, and others.
- Modular execution models may appear in future iterations to optimize performance.
Slide 22: EVM Conclusion
Title: Conclusion: EVM - The Backbone of Ethereum Execution
- The EVM allows Ethereum to execute smart contracts in a trustless, decentralized manner.
- Understanding its internals (bytecode, gas, stack, memory) is essential for optimizing smart contract development and avoiding security vulnerabilities.
Slide 23: Applications of Ethereum
the creation of unique digital assets (e.g., OpenSea, Foundation).
Slide 24: Conclusion
- Ethereum is more than just a cryptocurrency platform; it’s a decentralized world computer enabling new financial systems, applications, and organizations.
- Core Takeaways:
- Programmability via smart contracts.
- Ether (ETH) as both currency and utility.
- The EVM ensures global consensus for computations.